using System;
using System.Collections.Generic;
using UnityEngine;

namespace Features
{
    [CreateAssetMenu(fileName = "Sacrifice", menuName = "Features/牺牲")]
    public class Sacrifice : Feature
    {
        public override void CancleEffect(FeatureEventArgs args)
        {

        }

        public override void ExecuteEffect(FeatureEventArgs args)
        {
            var self = args.pawn;
            var target = originalRoots.GetComponent<Pawn>();

            target.Heal(self.Property.HealPoint);
            self.BeHit(self.Property.HealPoint + 1, null);
        }

        public override string GetDescription()
        {
            return "牺牲自身";
        }
    }
}